package com.example.finaltest.shoppingCart;

import java.io.Serializable;
import java.util.List;

public class Goods implements Serializable{


    private Integer code;
    private String message;
    private List<Goods.GoodsInfo> data;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<Goods.GoodsInfo> getData() {
        return data;
    }

    public void setData(List<Goods.GoodsInfo> data) {
        this.data = data;
    }

    public static class GoodsInfo implements Serializable {

        /**
         * id : 1
         * commodityId : null
         * count : 100
         * userId : 1
         * commodityName : 奥利奥
         * commodityInfo : 奥利奥饼干
         * commodityPhoto : /image/commodity/aoliao.png
         * univalence : 3.5
         * totalprices : 350
         */

        private int id;
        private int commodityId;
        private int count;
        private int userId;
        private String commodityName;
        private String commodityInfo;
        private String commodityPhoto;
        private double univalence;
        private double totalprices;
        private boolean isChoosed;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getCommodityId() {
            return commodityId;
        }

        public void setCommodityId(int  commodityId) {
            this.commodityId = commodityId;
        }
        public void setCommodityId(double commodityId) {
            this.commodityId = (int)commodityId;
        }

        public int getCount() {
            return count;
        }

        public void setCount(int count) {
            this.count = count;
        }

        public int getUserId() {
            return userId;
        }

        public void setUserId(int userId) {
            this.userId = userId;
        }

        public String getCommodityName() {
            return commodityName;
        }

        public void setCommodityName(String commodityName) {
            this.commodityName = commodityName;
        }

        public String getCommodityInfo() {
            return commodityInfo;
        }

        public void setCommodityInfo(String commodityInfo) {
            this.commodityInfo = commodityInfo;
        }

        public String getCommodityPhoto() {
            return commodityPhoto;
        }

        public void setCommodityPhoto(String commodityPhoto) {
            this.commodityPhoto = commodityPhoto;
        }

        public double getUnivalence() {
            return univalence;
        }

        public void setUnivalence(double univalence) {
            this.univalence = univalence;
        }

        public double getTotalprices() {
            return totalprices;
        }

        public void setTotalprices(double totalprices) {
            this.totalprices = totalprices;
        }

        public boolean isChoosed() {
            return isChoosed;
        }

        public void setChoosed(boolean choosed) {
            isChoosed = choosed;
        }

    }
}
